package com.abu.course.mapper;


import com.abu.course.pojo.Course;
import com.abu.course.vo.ClassroomOrderVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 课程表 Mapper 接口
 * </p>
 *
 * @author 阿布
 * @since 2021-02-05
 */
public interface CourseMapper extends BaseMapper<Course> {


    List<Course> selectCourseIsExists(@Param("classroomId") Long id, @Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

    List<Course> selectPages(@Param("page") Long page,@Param("size") Long size, @Param("name") String classroomName);

    Integer selectTotalSimple(String classroomName);

    List<Course> selectPageByCondition(@Param("classroomName") String classroomName, @Param("beginTime") LocalDateTime beginTime,@Param("endTime") LocalDateTime endTime);

    Integer selectCountByCondition(@Param("classroomName") String classroomName,@Param("beginTime") LocalDateTime beginTime, @Param("endTime") LocalDateTime endTime);

    List<ClassroomOrderVO> getClassroomOrderByClassroomName(String classroomName);

    List<Course> selectBetweenBeginTimeAndEndTime(@Param("page") Long page, @Param("size") Long limit, @Param("beginTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    Integer selectBetweenBeginTimeAndEndTimeTotal(@Param("beginTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    List<Course> selectPageNonCondition(@Param("page") Long page, @Param("size") Long limit);

    Integer selectTotal();

}
